package org.jeecg.modules.fund.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.fund.entity.FundHold;
import org.jeecg.modules.fund.entity.FundLibrary;

import java.util.List;
import java.util.Map;

public interface FundHoldMapper extends BaseMapper<FundHold> {
    /**
     * 获取持有分页
     * @param page
     * @param library
     * @return
     */
    IPage<Map<String,Object>> selectPageVo(IPage<FundLibrary> page,@Param("library") FundLibrary library);

    /**
     * 获取持有统计
     * @param userId
     * @param groupId
     * @return
     */
    Map<String,Object> findDetailCount(@Param("userId") String userId, @Param("groupId") String groupId);

    /**
     * 获取持有净值列表
     * @param tableName
     * @param fundId
     * @param startDate
     * @param endDate
     * @return
     */
    List<Map<String,Object>> findHoldValueList(@Param("tableName") String tableName, @Param("fundId") String fundId, @Param("startDate") String startDate, @Param("endDate") String endDate);


    /**
     * 获取持有详情
     * @param id
     * @return
     */
    Map<String,Object> detail(@Param("id") String id);

}
